External, Internal, and Universal Data Formats
APPX communicates data in any of three formats (distinguishable by the intended recipient), and automatically translates between these formats as appropriate:
External formats communicate data to an application user. They represent the displayable form and include all formatting characters (such as $, :, -, /, and #) called for by display masks, if any.
Internal formats communicate data to the system. They represent the way APPX manages data (binary, packed decimal, or alpha, for example). The internal format is determined by Storage Type, Field Type, Edit Mask, and Length specifications.
Universal formats communicate data to a designer. They represent a consistent (alpha) representation of data, which is independent of how information is stored or displayed. Default values, range checks, constants entered in a statement, record selection criteria, and query and child selection criteria are all maintained in Application Design in a universal format. Unlike external formats, universal formats do not include the formatting characters found in display masks. However, note that there is no difference in the external, internal, and universal formats for format fields (and domain-type fields based on a format domain). Format fields are displayed, stored, and coded using the same format.
Universal formats provide several significant advantages. They minimize maintenance overhead; you can change a field's storage or display characteristics without updating those portions of the APPX design facility that reference a field as a constant. They also permit you to reference and operate on a predictable format for the contents of a field, without having to remember exactly how data either displays or is stored in the system. A good example of this is a date field which is typically stored in packed decimal format. By means of appropriate display masks, the date April 15, 2002, may appear as 04/15/2002 to a user on an input or record selection screen and yet print as Apr 15, 2002, on a report. However, the designer would use the universal format of 20020415-------- to code this date wherever needed within Application Design.
The universal format for fields is described as follows:
A date/time field consists of a mandatory 16 digits (or blank). When designing statements, range checks, or query and child selection criteria, paired hyphens for leading or trailing 'parts' in a field are also permitted. These hyphens indicate that a corresponding part is not significant to the comparison or other operation.
A logic field includes 1 or Y for 'yes', 0 or N for 'no', and blank for "unknown". Note that the external format of these values vary by how the logic field is displayed. If displayed as a checkbox, is 'yes', is 'no', and is "unknown". If displayed as a toggle button, is 'yes' and is 'no' or "unknown" (since an unknown value is treated as a 'no' when using a toggle button). If displayed as raw text, Y is 'yes', N is 'no', and blank is "unknown" (Y, N or blank using Character Mode).
A numeric field consists of digits, and an optional decimal point, optional leading or trailing sign (or blank).
An alphanumeric field includes letters, digits, and special characters as well as justification, pad characters, paragraph symbols (for text fields), and constant characters (for format fields). |